home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / HELPD.ZIP / HELPD.PRO < prev    next >
Encoding:
Text File  |  1994-04-12  |  23.8 KB  |  607 lines

  1. nobreak /* user can't break out of program with ctl/c, etc. */
  2.  
  3. /* 
  4.     program for PC HELP DESK services
  5.     (C) 1991 by DAN DALAL
  6.     version 1.2 created 26-jun-1991.
  7.     modified 12-apr-1994
  8.     
  9.     NOTE FROM AUTHOR:
  10.     
  11.     It is my sincere intent that this program be used in a positive,
  12.     constructive way to help you better your MIS(DP) help desk
  13.     functions. As such, I would be very interested in keeping in touch
  14.     with those of you who do make "major" modifications, fixes and
  15.     other sorts of changes to this program that I wrote.
  16.     
  17.     PROLOG, is a very interesting language and although I now rely on
  18.     C and C++ in my programs, I still have a very deep appreciation
  19.     and love for PROLOG and all the wonderful things you can do with it !
  20.     Remember, Variables are in UPPERCASE in PROLOG !
  21.         
  22.     Happy hacking and have fun !
  23.     
  24.     Dan Dalal
  25.     04/11/94
  26.     
  27. */
  28.  
  29. code=4000 /* you can play around with this value... */
  30.  
  31. domains
  32.  
  33. file = temm
  34.  
  35. predicates
  36.  
  37.  main_menu
  38.  opening
  39.  prg(integer)
  40.  do_log(integer)
  41.  check_min(integer)
  42.  next_phase(string,string,string,string,string,string,string,string,string,string,string)
  43.  next_phase2(string,string,string,string,string,string,string,string,string,string,string)
  44.  check_sec(integer)       
  45.  title_screen
  46.  chj(char)
  47.  che(char)
  48.  print_file
  49.      
  50. goal 
  51.  
  52. /* if both files are there then...*/
  53.  
  54. makewindow(20,0,0,"",0,0,25,80),clearwindow,
  55. makewindow(22,7,0,"",0,0,25,80),clearwindow,
  56. title_screen,gotowindow(22),removewindow,
  57. makewindow(25,7,7,"< Messages >",20,0,5,80),
  58. existfile("PROBLEM.LOG"),
  59. existfile("PHONE.LST"),
  60. opening,
  61.  main_menu ;
  62.  
  63. /*
  64.  
  65. gotowindow(25),removewindow,
  66. gotowindow(20),removewindow,exit ;  missing problem log then...
  67.  
  68. */
  69.  
  70. existfile("PHONE.LST"),
  71. makewindow(11,7,7," ERROR - FILE NOT FOUND ",6,15,4,60),
  72. write(" Could not find PROBLEM.LOG..."),nl,
  73. write("Press any key to continue."),readchar(_),
  74. openwrite(temm,"PROBLEM.LOG"),
  75. closefile(temm),
  76. gotowindow(11),removewindow,
  77. makewindow(11,7,7,"",6,15,4,60),cursor(0,0),
  78. write("PROBLEM.LOG has been created."),nl,
  79. write("Press any key to continue..."),readchar(_),clearwindow,removewindow,
  80. opening,main_menu,gotowindow(25),removewindow,
  81. gotowindow(20),removewindow,exit ;
  82.  
  83. /*missing problem log then...*/
  84.  
  85. existfile("PROBLEM.LOG"),
  86. makewindow(11,7,7," ERROR - FILE NOT FOUND ",6,15,4,60),
  87. write(" Could not find PHONE.LST..."),nl,
  88. write("Press any key to continue."),readchar(_),
  89. openwrite(temm,"PHONE.LST"),
  90. closefile(temm),
  91. gotowindow(11),removewindow,
  92. makewindow(11,7,7,"",6,15,4,60),cursor(0,0),
  93. write(" PHONE.LST has been created."),nl,
  94. write("Press any key to continue..."),readchar(_),clearwindow,removewindow,
  95. opening,main_menu,gotowindow(25),removewindow,
  96. gotowindow(20),removewindow,exit ;
  97.  
  98. /* if both files are missing */
  99.  
  100. makewindow(11,7,7," ERROR - FILES NOT FOUND ",6,15,4,60),
  101. write(" Could not find necessary files..."),nl,
  102. write("Press any key to continue."),readchar(_),
  103.  
  104. /* create files now...*/
  105.  
  106. openwrite(temm,"PHONE.LST"),
  107. closefile(temm),
  108. openwrite(temm,"PROBLEM.LOG"),
  109. closefile(temm),
  110. gotowindow(11),removewindow,
  111. makewindow(11,7,7,"",6,15,4,60),cursor(0,0),
  112. write(" PHONE.LST and PROBLEM.LOG have been created."),nl,
  113. write("Press any key to continue..."),readchar(_),clearwindow,removewindow,
  114. opening,main_menu,gotowindow(25),removewindow,
  115. gotowindow(20),removewindow,exit.
  116.  
  117.  
  118.  
  119.  
  120. clauses
  121.  
  122. check_min(M) :- M <=9,write("0",M),! ; write(M),!.
  123. check_sec(S) :- S <=9,write("0",S),! ; write(S),!.
  124.  
  125. /* you can comment this section out when you get tired of it ! */ 
  126.  
  127. opening:-
  128.  makewindow(2,7,7,"< Welcome to HELPD v1.2 >",0,0,25,80),clearwindow,
  129.  cursor(0,0),
  130. write(" Welcome to HELPD, the PC HELP DESK program that centralizes vital help"),nl,
  131. write("desk functions such as problem logging, quick tips, phone numbers of"),nl,
  132. write("critical technical support staff and much more, all in a user-friendly"),nl,
  133. write("environment. "),nl,nl,
  134. write(" Version 1.2 now offers the ability to assign log(tracking) numbers for each "),nl,
  135. write("log that is placed. The numbering sequence for this is site dependent. Also,"),nl,
  136. write("you now can print out the PROBLEM.LOG file to an attached printer(option #7)."),nl,
  137. write("You also can append the PHONE.LST file to add you site's own list of phone"),nl,
  138. write("and contact support persons..."),nl,nl,
  139.  
  140. write(" HELPD can be used in MIS or DP departments, PC repair areas, or anywhere"),nl,
  141. write("you need to keep a record of PC repairs, troubleshooting tips and generally"),nl,
  142. write("asked questions about PCs in your environment..."),nl,nl,
  143. write(" HELPD is a PUBLIC DOMAIN. HELPD can be freely distributed, as long as "),nl,
  144. write("no fees are charged for this program, except for copying services..."),nl,nl,
  145. write(" Dalal Publishing Co. makes no warranty (expressed or implied) with the use"),nl,
  146. write("of this software. Dalal Publishing Co. is not liable for any damages or"),nl,
  147. write("loss due to the use of this software."),nl,nl,
  148. write("                        Press any key to go to next screen..."),
  149. readchar(_),clearwindow,
  150. cursor(0,0),
  151. write("Contact Dalal Publishing Co. for more information about future versions."),nl,nl,
  152. write("Dan Dalal c/o Dalal Publishing Co."),nl,
  153. write("374 Don Basillo Way"),nl,
  154. write("San Jose, CA 95123-3105."),nl,nl,
  155. write(" Or call (408) 225 - 6157 (between 9:00am and 5:00pm,PST) for more details."),nl,nl,
  156. write(" PLEASE BE SURE THAT THE PROBLEM.LOG, PHONE.LST, HELPD.EXE and"),nl,
  157. write(" README.EXE FILES ARE IN THE SAME DIRECTORY OR ON THE SAME DISK "),nl,nl,
  158. write("ALL PRODUCT NAMES AND TRADEMARKS USED IN THIS PROGRAM ARE PROPERTY OF"),nl,
  159. write("THEIR RESPECITVE OWNERS."),nl,
  160. write("HELPD is written in PROLOG and the source code is included as HELPD.PRO"),nl,nl,
  161. write(" Thank you for your support and for using HELPD..."),nl,nl,
  162. write("                        Press any key to begin"),
  163. readchar(_),clearwindow,removewindow.
  164.          
  165. main_menu :-
  166.       existfile("PHONE.LST"),existfile("PROBLEM.LOG"),
  167.       shiftwindow(25),nl,
  168.           write("This is the main menu screen. You are to enter a number between 1 and 8"),nl,
  169.           write("or '0' to exit HELPD. "),
  170.       time(H,M,_,_),write(" The current time is ",H,":"),check_min(M),nl,
  171.        makewindow(3,7,7,"< Main Menu v1.2 >",4,15,15,54),shiftwindow(3),
  172.        cursor(0,0),
  173.        write(" Selections : "),nl,
  174.        write("      1 - Log a PC problem or user question"),nl,
  175.        write("     2 - Show telephone list/contacts"),nl,
  176.        write("    3 - Generally asked questions/answers"),nl,
  177.        write("     4 - Exit to DOS/stay resident"),nl,
  178.        write("        5 - Modify telephone list/contacts "),nl,
  179.        write("        6 - Display current PROBLEM log"),nl,
  180.        write("        7 - Print PC/USER problem log"),nl,
  181.        write("        8 - HELP "),nl,
  182.        write("        0 - EXIT HELPD "),nl,
  183.        write("           Enter a number [ ]"),nl,nl,
  184.        write(" HELPD (C)1994 by Dan Dalal. All Rights Reserved."),
  185.        cursor(10,27),
  186.        readchar(I),char_int(I,J),prg(J), ! ; /* or */
  187.            makewindow(4,7,7," FILE NOT FOUND ERROR ",8,15,6,60),
  188.            shiftwindow(4),write("Missing data file(s). Did you delete, rename or "),nl,
  189.            write("change directories while you were in the DOS environment ?"),nl,
  190.            write("Program terminated. Press any key to exit."),
  191.            readchar(_),
  192.            write(" renaming it..."),nl,gotowindow(4),removewindow,
  193.            gotowindow(25),removewindow,gotowindow(20),removewindow,
  194.            exit.
  195.                
  196.        
  197.     /* remember, we're checking for ASCII equiv. */
  198.            
  199.        prg(J) :- J<>48, J <> 49,J <> 50,J <> 51,J <> 52,J <> 53,J <> 54,J <> 55,
  200.            J<>56,shiftwindow(25),write("An entry error was made"),nl,
  201.            makewindow(4,7,7," ERRROR IN ENTRY ",18,15,3,50),
  202.            gotowindow(4),write("           Press any key to continue"),
  203.            readchar(_),
  204.            gotowindow(4),removewindow,gotowindow(3),
  205.         removewindow,main_menu.
  206.     
  207.     /* phone list entry window...*/
  208.     
  209.       prg(53) :-
  210.       makewindow(11,7,7,"< PHONE.LST Update >",5,10,11,60),
  211.       gotowindow(11),
  212.       write("Enter the person's name: "),shiftwindow(25),
  213.       write("Enter in the format <first name> <last name> "),nl,
  214.       shiftwindow(11),
  215.       readln(PNAME),nl,
  216.       write("Enter the person's phone number: "),shiftwindow(25),
  217.       write("Enter the phone number or extension of this person"),nl,
  218.       shiftwindow(11),
  219.       readln(PPHONE),nl,
  220.       write("Enter the person's EMAIL address: "),shiftwindow(25),
  221.       write("Enter the person's EMAIL address, press RETURN if none."),nl,
  222.       shiftwindow(11),
  223.       readln(PEMAIL),nl,
  224.       write("Enter the person's specialty: "),shiftwindow(25),
  225.       write("Enter the person's area of expertise, or specialty. "),nl,
  226.       shiftwindow(11),
  227.       readln(PSPECIAL),nl,
  228.       clearwindow,
  229.       write("Name: ",PNAME),nl,
  230.       write("Phone/ext. : ",PPHONE),nl,
  231.       write("EMAIL address : ",PEMAIL),nl,
  232.       write("SPCLTY : ",PSPECIAL),nl,nl,
  233.       write("Is this correct(y/n) ?"),shiftwindow(25),
  234.       write("Enter a 'y' if everything looks ok, or a 'n' if not..."),nl,
  235.       shiftwindow(11),
  236.       readchar(YYU),chj(YYU),
  237.          openappend(temm,"PHONE.LST"),
  238.        writedevice(temm),nl,
  239.       write("Name: ",PNAME),nl,
  240.       write("Phone/ext.: ",PPHONE),nl,
  241.       write("EMAIL address: ",PEMAIL),nl,
  242.       write(">> SPCLTY: ",PSPECIAL),nl,
  243.       closefile(temm),
  244.       gotowindow(25),nl,
  245.       write("PHONE.LST file has been appended with this data..."),nl,
  246.       write("Press any key to return to the main menu."),readchar(_),
  247.       gotowindow(11),
  248.       clearwindow,removewindow,
  249.       main_menu.
  250.       
  251.     /* help window */       
  252.        prg(56) :- 
  253.        gotowindow(25),
  254.        write("This is the help window on the screen now, for the main menu."),nl,
  255.        makewindow(5,7,7,"< Help >",5,10,11,50),
  256.        gotowindow(5),
  257.        write(" You are to enter the appropriate number "),nl,
  258.        write("(1,2,3,4,5,6,7,8,0) to enter that particular "),nl,
  259.        write("menu selection (You entered a '8' to get here)."),nl,
  260.        write("For example, to enter a problem with a PC,"),nl,
  261.        write("enter a '1' and you will be taken to that"),nl,
  262.        write("module of the program. Entering '4' causes"),nl,
  263.        write("HELPD to exit to DOS, but stay in memory."),nl,nl,
  264.        write("Press any key to return to the main menu."),readchar(_),
  265.        gotowindow(5),removewindow,gotowindow(3),removewindow,
  266.     main_menu.
  267.    
  268.            prg(48) :- gotowindow(3),removewindow,shiftwindow(25),
  269.            write("Are you sure you want to quit(y/n) ?"),readchar(QQ),
  270.            che(QQ),!.
  271.            
  272.           prg(52):- makewindow(13,7,0,"",0,0,25,80),write("Type EXIT to return\n\n"),
  273.              system(""),!,removewindow,gotowindow(3),removewindow,
  274.     main_menu.
  275.           prg(52):-shiftwindow(25),
  276.           write(">> COMMAND.COM not accessible. press any key"),readchar(_),nl,!,
  277.           main_menu.
  278.       
  279.       /* show phone list */
  280.       
  281.       prg(50) :-
  282.       gotowindow(3),removewindow,
  283.       shiftwindow(25),write("This is the current phone/contact list with the person's name, phone # and "),nl,
  284.       write("any specialty(area of knowledge). Press any key to return to main menu."),nl,
  285.           makewindow(10,7,7,"< PHONE.LST - Use Arrow keys to move about ; ESC - EXIT >",0,0,25,80),
  286.       file_str("PHONE.LST",TXT),display(TXT),clearwindow,
  287.       removewindow,main_menu.
  288.       prg(50):-
  289.       gotowindow(3),removewindow,
  290.       makewindow(4,7,7," ERROR - FILE NOT FOUND ",18,15,3,50),
  291.       gotowindow(4),write("           Press any key to continue"),
  292.       readchar(_),
  293.       gotowindow(4),removewindow,main_menu.
  294.       
  295.     /* again, this can be site specific and can be tailored to your
  296.        site's needs... 
  297.     */
  298.     
  299.       prg(51) :-
  300.       gotowindow(3),removewindow,
  301.       makewindow(7,7,7,"< GENERALLY ASKED QUESTIONS/ANSWERS >",0,0,19,80),
  302.       shiftwindow(25),
  303.       write("This is the most generally asked questions and answers. Press "),nl,
  304.       write("any key to return to the main menu..."),nl,
  305.       gotowindow(7),
  306.       cursor(0,0),
  307.       write("To FORMAT a disk in DOS use the FORMAT command; FORMAT d:, where d = drive"),nl,
  308.       write("To COPY a file from one disk to another, use the COPY command as:"),nl,
  309.       write("COPY d:<filename>.<ext> dd:<filename>.<ext>, where d = drive; dd = dest. drive"),nl,
  310.       write("To make a subdirectory, use the MD command as MD <directory name> "),nl,
  311.       write("To remove a subdirectory, use the RD command as RD <directory name>"),nl,nl,
  312.       write(" << Please see the source code as you will have the capability to modify this as "),nl,
  313.       write("    needed to suit your site needs >> "),
  314.       readchar(_),removewindow,main_menu.
  315.       
  316.       prg(49) :-
  317.       gotowindow(3),removewindow,
  318.       shiftwindow(25),
  319.       write("This window will allow you to log a user or pc problem and save the "),nl,
  320.       write("data to the problem log file on disk. Enter a '1'-> PC ; '2'-> User"),nl,
  321.       makewindow(8,7,7,"< PC/USER Problem Log >",6,15,10,60),
  322.       clearwindow,cursor(0,0),write("Is this a PC(1) or USER(2) Log(1/2) ?"),
  323.       readchar(JJ),
  324.       gotowindow(8),
  325.       removewindow,
  326.       char_int(JJ,HH),do_log(HH),main_menu.
  327.  
  328.       prg(55) :-
  329.       shiftwindow(25),
  330.       write("Prepare your on-line printer for printing. Be sure the printer is"),nl,
  331.       write("in a on-line state and the paper at the top of the form. Press any key"),nl,
  332.       write("to begin prinitng..."),readchar(_),
  333.       openread(temm,"PROBLEM.LOG"),
  334.       readdevice(temm),
  335.       print_file,
  336.       closefile(temm),
  337.       gotowindow(3),removewindow,main_menu.
  338.       prg(55):-
  339.         gotowindow(3),removewindow,
  340.           makewindow(4,7,7," ERROR - FILE NOT FOUND ",18,15,3,50),
  341.            gotowindow(4),write("           Press any key to continue"),
  342.            readchar(_),
  343.            gotowindow(4),removewindow,main_menu.
  344.       
  345.  
  346.       
  347.  
  348.  
  349.       prg(54) :-
  350.       gotowindow(3),removewindow,
  351.       makewindow(10,7,7,"< PROBLEM.LOG - Use Arrow keys to move about ; ESC - EXIT >",0,0,25,80),
  352.       file_str("PROBLEM.LOG",TXT),display(TXT),clearwindow,removewindow,
  353.       main_menu.
  354.       prg(54):-
  355.         gotowindow(3),removewindow,
  356.           makewindow(4,7,7," ERROR - FILE NOT FOUND ",18,15,3,50),
  357.            gotowindow(4),write("           Press any key to continue"),
  358.            readchar(_),
  359.            gotowindow(4),removewindow,main_menu.
  360.       
  361.       
  362.       do_log(HH) :- HH <> 49,HH <> 50, 
  363.           makewindow(4,7,7," ERRROR IN ENTRY ",18,15,3,50),
  364.            gotowindow(4),write("           Press any key to continue"),
  365.            readchar(_),
  366.            gotowindow(4),removewindow.
  367.            
  368.     /* main user entry window */
  369.     
  370.       do_log(49) :-
  371.       makewindow(8,7,7,"< PC Problem Log >",6,15,14,60),
  372.       cursor(0,0),
  373.       write("Enter problem description : "),nl,shiftwindow(25),
  374.       write("Enter a brief description of the problem (up to 40 characters)..."),nl,
  375.       write("ie. 'User cannot get his hard disk to boot.'"),nl,
  376.       shiftwindow(8),
  377.       readln(PROBLEM),
  378.       write("Enter Computer type(ie. PC, WORKSTATION) : "),shiftwindow(25),
  379.       write("Enter the type of the computer..."),nl,
  380.       write("ie. 'PC'"),nl,
  381.       shiftwindow(8),
  382.       readln(COMPUTER_TYPE),
  383.       write("Enter any special hardware/software: "),shiftwindow(25),
  384.       write("Enter any special hardware or software the user is running.."),nl,
  385.       write("ie. 'math co-processor'"),nl,
  386.       shiftwindow(8),
  387.       readln(H_S),
  388.       write("Enter Computer model : "),shiftwindow(25),
  389.       write("Enter model..."),nl,
  390.       write("ie. 'AT'"),nl,
  391.       shiftwindow(8),
  392.       readln(COMPUTER_MODEL),
  393.       write("Enter Location : "),shiftwindow(25),
  394.       write("Enter the physical location of this machine..."),nl,
  395.       write("ie. 'Bob Jones's desk in bldg. 23'"),nl,
  396.       shiftwindow(8),
  397.       readln(LOCATION),
  398.       write("Enter User's name : "),shiftwindow(25),
  399.       write("Enter the user's name using the machine..."),nl,
  400.       write("ie. 'Bob Jones'"),nl,
  401.       shiftwindow(8),readln(USERNAME),
  402.       write("Enter User's phone # : "),shiftwindow(25),
  403.       write("Enter the user's phone number or extension..."),nl,
  404.       write("ie. 'x3232'"),nl,
  405.       shiftwindow(8),
  406.       readln(USER_PHONE),
  407.       write("Enter EMAIL address(RETURN if none) : "),shiftwindow(25),
  408.       write("Enter any email address for this person, else press RETURN..."),nl,
  409.       shiftwindow(8),
  410.       readln(EMAIL_ADD),
  411.       write("Enter name of person logging call : "),shiftwindow(25),
  412.       write("Enter your name(or person entering this data)..."),nl,shiftwindow(8),
  413.       readln(LOG_PERSON),
  414.       write("Enter the Priority/Severity of call(1 - 10) : "),shiftwindow(25),
  415.       write("Enter priority of call(1 = system down ; 10 = stop by with coffee, no rush.)"),nl,
  416.       write("ie. '3'"),nl,
  417.       shiftwindow(8),
  418.       readln(SEVPRIO),
  419.       write("Enter log number : "),shiftwindow(25),
  420.       write("Enter a tracking number that your site uses to keep track of the log."),nl,
  421.       write("ie. '0001001'"),nl,
  422.       shiftwindow(8),
  423.       readln(TRACKING_NUM),
  424.       clearwindow,!,
  425.       next_phase(PROBLEM,COMPUTER_TYPE,H_S,COMPUTER_MODEL,LOCATION,USERNAME,USER_PHONE,EMAIL_ADD,LOG_PERSON,SEVPRIO,TRACKING_NUM).
  426.  
  427.  
  428.  
  429.  
  430.       do_log(50) :-
  431.       existfile("PROBLEM.LOG"),
  432.       makewindow(8,7,7,"< User Problem Log >",6,15,14,60),
  433.       cursor(0,0),
  434.       write("Enter User problem/description : "),nl,shiftwindow(25),
  435.       write("Enter a brief description of the problem or question(40 char. max).."),nl,
  436.       write("ie. 'What is word processing ?'"),nl,
  437.       shiftwindow(8),readln(PROBLEM),
  438.       write("Enter Computer type(ie. PC, WORKSTATION) : "),shiftwindow(25),
  439.       write("Enter the type of the machine..."),nl,
  440.       write("ie. 'PC'"),nl,
  441.       shiftwindow(8),readln(COMPUTER_TYPE),
  442.       write("Enter any special hardware/software : "),shiftwindow(25),
  443.       write("Enter any special hardware or software the user is running..."),nl,
  444.       write("ie. 'KERMIT v3.0'"),nl,
  445.       shiftwindow(8),readln(H_S),
  446.       write("Enter Computer model : "),shiftwindow(25),
  447.       write("Enter the specific model..."),nl,
  448.       write("ie. 'XT'"),nl,
  449.       shiftwindow(8), 
  450.       readln(COMPUTER_MODEL),
  451.       write("Enter Location : "),shiftwindow(25),
  452.       write("Enter the physical location where the user is..."),nl,
  453.       write("ie. 'John's desk'"),nl,
  454.       shiftwindow(8),readln(LOCATION),
  455.       write("Enter User's name : "),shiftwindow(25),
  456.       write("Enter the user's name..."),nl,
  457.       write("ie. 'John Smith'"),nl,
  458.       shiftwindow(8),
  459.       readln(USERNAME),
  460.       write("Enter User's phone # : "),shiftwindow(25),
  461.       write("Enter the user's phone number or extension..."),nl,
  462.       write("ie. '555-1212'"),nl,
  463.       shiftwindow(8),readln(USER_PHONE),
  464.       write("Enter EMAIL address(RETURN if none) : "),shiftwindow(25),
  465.       write("Enter any EMAIL address the user can be reached at..."),nl,
  466.       shiftwindow(8),
  467.       readln(EMAIL_ADD),
  468.       write("Enter name of person logging call : "),shiftwindow(25),
  469.       write("Enter your name(or person taking the call)..."),nl,
  470.       shiftwindow(8),readln(LOG_PERSON),
  471.         write("Enter the Priority/Severity of call(1 - 10) : "),shiftwindow(25),
  472.       write("Enter priority of call(1 = system down ; 10 = stop by with coffee, no rush)"),nl,
  473.       write("ie. '5'"),nl,
  474.       shiftwindow(8),
  475.       readln(SEVPRIO),
  476.       write("Enter log number : "),shiftwindow(25),
  477.       write("Enter a tracking number that your site uses to keep track of the log."),nl,
  478.       write("ie. '0001001'"),nl,
  479.       shiftwindow(8),
  480.       readln(TRACKING_NUM),
  481.  
  482.       clearwindow,
  483.      next_phase2(PROBLEM,COMPUTER_TYPE,H_S,COMPUTER_MODEL,LOCATION,USERNAME,USER_PHONE,EMAIL_ADD,LOG_PERSON,SEVPRIO,TRACKING_NUM),!.
  484.      
  485.      next_phase2(PROBLEM,COMPUTER_TYPE,H_S,COMPUTER_MODEL,LOCATION,USERNAME,USER_PHONE,EMAIL_ADD,LOG_PERSON,SEVPRIO,TRACKING_NUM) :-
  486.       cursor(0,0),
  487.       write("User Problem/description:"),nl,
  488.       write(PROBLEM),nl,
  489.       write("Computer type : ",COMPUTER_TYPE),nl,
  490.       write("Computer model : ",COMPUTER_MODEL),nl,
  491.       write("Special hardware/software:",H_S),nl,
  492.       write("Location : ",LOCATION),nl,
  493.       write("User's name : ",USERNAME),nl,
  494.       write("User's phone number : ",USER_PHONE),nl,
  495.       write("EMAIL address(BLANK = n/a) : ",EMAIL_ADD),nl,
  496.       write("Priority/Severity(1 - 10) : ",SEVPRIO),nl,
  497.       write("Tracking number : ",TRACKING_NUM),nl,
  498.       write("Is this correct(y/n) ?"),
  499.       readchar(P),P = 'y',nl,
  500.       write("Data will be written to PROBLEM.LOG"),nl,
  501.       openappend(temm,"PROBLEM.LOG"),
  502.       writedevice(temm),
  503.       nl,nl,
  504.       write("****** USER PROBLEM/QUESTION *************"),nl,
  505.       write("Tracking number : ",TRACKING_NUM),nl,
  506.       write("Description:"),nl,
  507.       write(PROBLEM),nl,
  508.       write("Computer type : ",COMPUTER_TYPE),nl,
  509.       write("Computer model : ",COMPUTER_MODEL),nl,
  510.       write("Special hardware/software: ",H_S),nl,
  511.       write("Location : ",LOCATION),nl,
  512.       write("User's name : ",USERNAME),nl,
  513.       write("User's phone number : ",USER_PHONE),nl,
  514.       write("EMAIL address(BLANK = n/a) : ",EMAIL_ADD),nl,
  515.       write("Person who took the call : ",LOG_PERSON),nl,
  516.           time(H,M,S,_),date(Y,MM,DAY),
  517.       write("Date logged : ",DAY,"-",MM,"-",Y," ",H,":"),check_min(M),
  518.       write(":"),check_sec(S),nl,
  519.       write(">>>> CALL PRIORITY/SEVERITY = ",SEVPRIO),nl,
  520.       write("Call has been assigned to : "),nl,
  521.       closefile(temm),
  522.       gotowindow(8),nl,
  523.       write("Data has been written to PROBLEM.LOG"),nl,
  524.       write("Press any key to return to main menu."),
  525.       readchar(_),
  526.       gotowindow(8),
  527.       removewindow,main_menu ;
  528.       gotowindow(8),removewindow,do_log(50),!.
  529.       
  530.       next_phase(PROBLEM,COMPUTER_TYPE,H_S,COMPUTER_MODEL,LOCATION,USERNAME,USER_PHONE,EMAIL_ADD,LOG_PERSON,SEVPRIO,TRACKING_NUM) :-
  531.       cursor(0,0),
  532.       write("Description:"),nl,
  533.       write(PROBLEM),nl,
  534.       write("Computer type : ",COMPUTER_TYPE),nl,
  535.       write("Computer model : ",COMPUTER_MODEL),nl,
  536.       write("Special hardware/software:",H_S),nl,
  537.       write("Location : ",LOCATION),nl,
  538.       write("User's name : ",USERNAME),nl,
  539.       write("User's phone number : ",USER_PHONE),nl,
  540.       write("EMAIL address(BLANK = n/a) : ",EMAIL_ADD),nl,
  541.       write("Priority/Severity(1 - 10) : ",SEVPRIO),nl,
  542.       write("Tracking number : ",TRACKING_NUM),nl,
  543.       write("Is this correct(y/n) ?"),shiftwindow(25),
  544.       write("Enter a 'y' if everything looks ok, or a 'n' if not..."),nl,
  545.       shiftwindow(8),
  546.       readchar(P),P = 'y',nl,
  547.       write("Data will be written to PROBLEM.LOG"),nl,
  548.       openappend(temm,"PROBLEM.LOG"),
  549.       writedevice(temm),
  550.       nl,nl,
  551.       write("****** PC PROBLEM ***********************"),nl,
  552.       write("Tracking number : ",TRACKING_NUM),nl,
  553.       write("Description:"),nl,
  554.       write(PROBLEM),nl,
  555.       write("Computer type : ",COMPUTER_TYPE),nl,
  556.       write("Computer model : ",COMPUTER_MODEL),nl,
  557.       write("Special hardware/software:",H_S),nl,
  558.       write("Location : ",LOCATION),nl,
  559.       write("User's name : ",USERNAME),nl,
  560.       write("User's phone number : ",USER_PHONE),nl,
  561.       write("EMAIL address(BLANK = n/a) : ",EMAIL_ADD),nl,
  562.       write("Person who took the call : ",LOG_PERSON),nl,
  563.       time(H,M,S,_),date(Y,MM,DAY),
  564.       write("Date Logged : ",DAY,"-",MM,"-",Y," ",H,":"),check_min(M),
  565.       write(":"),check_sec(S),nl,
  566.       write(">>>> Priority/Severity = ",SEVPRIO),nl,
  567.       write("Call has been assigned to : "),nl,
  568.       closefile(temm),
  569.       gotowindow(8),nl,
  570.       write("Data has been written to PROBLEM.LOG"),nl,
  571.       write("Press any key to return to main menu."),
  572.       readchar(_),
  573.       gotowindow(8),
  574.       removewindow,main_menu;
  575.       gotowindow(8),removewindow,do_log(49),!.
  576.  
  577.           title_screen :-
  578.           
  579.     /* this is the opening screen...again, this can be site  tailored... */
  580.           
  581.           cursor(10,26),
  582.           write("HELPD - The Help Desk Centralizer! "),nl,
  583.           write("                                        v1.2"),nl,
  584.           write("                            (C) 1994 Dalal Publishing Co. "),nl,nl,
  585.           write("                                Press any key to begin"),
  586.           readchar(_),clearwindow,!.
  587.           
  588.           chj('y') :- !.
  589.           chj('n') :- gotowindow(11),clearwindow,removewindow,prg(53).
  590.           chj(YYU) :-  YYU <> 'y',YYU <> 'n',gotowindow(11),removewindow,main_menu.
  591.            
  592.           che('y'):- /* gotowindow(25),removewindow, */ !, exit.
  593.       che('n') :- main_menu.
  594.           che(QQ) :- QQ <> 'y',QQ <> 'n',main_menu.
  595.           
  596.           print_file :-
  597.           not(eof(temm)),
  598.           readln(C),
  599.           writedevice(printer),
  600.           write(C),nl,
  601.           shiftwindow(25),
  602.           writedevice(screen),
  603.           write(C),nl,
  604.           print_file.
  605.           
  606.           print_file :- eof(temm),!.
  607.